import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import pinia from "@/store";
import VConsole from "vconsole";
import "vant/es/toast/style";
import "vant/es/dialog/style";
import "@vant/touch-emulator";
import "./assets/font/font.css";
// import { mockFn } from "./mock/index";
// 可能会影响上传功能 不用时请关闭
// mockFn();
window.addEventListener("offline", () => {
  showToast("网络连接错误！");
});
window.addEventListener("online", () => {
  window.location.reload();
});
const app = createApp(App);
if (process.env.NODE_ENV == "development") {
  new VConsole({ theme: "dark" });
}
app.use(pinia).use(router).mount("#app");
